// GetPropertyFunctionTrigger.h: interface for the GetPropertyFunctionTrigger class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GETPROPERTYFUNCTIONTRIGGER_H__47F3F23A_EE96_4D84_984B_54D8F4B7F5AD__INCLUDED_)
#define AFX_GETPROPERTYFUNCTIONTRIGGER_H__47F3F23A_EE96_4D84_984B_54D8F4B7F5AD__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <afxtempl.h>

class GetPropertyFunction;
class ModelObject;
class DllExport GetPropertyFunctionTrigger  
{
public:
	GetPropertyFunctionTrigger();
	virtual ~GetPropertyFunctionTrigger();

public:
	void OwnerPart(ModelObject* pPart){
		m_pPart = pPart;
	}

	void Trigger();
	void Open(){
		m_nState = TRUE;
	}
	void Close(){
		m_nState = FALSE;
	}

	BOOL IsOpen(){
		return m_nState;
	}

private:
	void Add(GetPropertyFunction* pFunction);
	void GetTriggerFuns();
	void RunFuns();

private:
	BOOL m_nState;
	ModelObject* m_pPart;
	CList<GetPropertyFunction*, GetPropertyFunction*> m_theTriggerFuns;
};

#endif // !defined(AFX_GETPROPERTYFUNCTIONTRIGGER_H__47F3F23A_EE96_4D84_984B_54D8F4B7F5AD__INCLUDED_)
